package com.shiguiwu.springmybatis.designpattern.visitor.impl;

import com.shiguiwu.springmybatis.designpattern.visitor.Visitor;
import lombok.extern.slf4j.Slf4j;

/**
 * @description: 家长
 * @author: stone
 * @date: Created by 2021/10/29 16:45
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.visitor.impl
 */
@Slf4j
public class Parent implements Visitor {
    @Override
    public void visit(Teacher teacher) {
        log.info("老师信息 姓名：{} 班级：{} 级别：{}", teacher.getName(),
                teacher.getClazz(), teacher.getIdentity());
    }

    @Override
    public void visit(Student student) {
        log.info("学⽣生信息 姓名：{} 班级：{} 排名：{}", student.getName(),
                student.getClazz(), student.ranking());
    }
}
